<div class="span9">
  <div class="thumbnail"> 
    <!-- breadcrumb -->
    <ul class="breadcrumb">
      <li><a href="{:U(GROUP_NAME . '/Index/index')}">用户管理</a> <span class="divider">/</span></li>
      <li class="active">节点列表</li>
    </ul>

    <h3 class="text-center">节点列表</h3>
    <h5 class="text-left"><a href="{:U(GROUP_NAME . '/Rbac/addNode')}" class="btn btn-info">添加应用</a></h5>
    <hr>
    <volist name="node" id="n">
      <!-- 应用 -->
      <div class="offset1">
        <h3>
          <label class="label label-info">{$n.title}</label>
          <a href="{:U(GROUP_NAME . '/Rbac/addNode', array('pid' => $n['id'], 'level' => 2))}" style="font-size: 13px">[添加控制器]</a>
          <a href="{:U(GROUP_NAME . '/Rbac/modifyNode', array('id' => $n['id'], 'level' => 1))}" style="font-size: 13px">[修改]</a>
          <a href="{:U(GROUP_NAME . '/Rbac/delNode', array('id' => $n['id']))}" style="font-size: 13px">[删除]</a>
        </h3>
      </div>

      <volist name="n['child']" id="a">
        <!-- 控制器 -->
        <div class="offset2">
          <h4>
            <span class="label label-primary">{$a.title}</span>
            <a href="{:U(GROUP_NAME . '/Rbac/addNode', array('pid' => $a['id'], 'level' => 3))}" style="font-size: 12px">[添加方法]</a>
            <a href="{:U(GROUP_NAME . '/Rbac/modifyNode', array('id' => $a['id'], 'level' => 2))}" style="font-size: 13px">[修改]</a>
            <a href="{:U(GROUP_NAME . '/Rbac/delNode', array('id' => $a['id']))}" style="font-size: 13px">[删除]</a>
          </h4>
        </div>

        <volist name="a['child']" id="m">
          <div class="offset3">
            <h4>
              <span class="label label-warning">{$m.title}</span>
              <a href="{:U(GROUP_NAME . '/Rbac/modifyNode', array('id' => $m['id'], 'level' => 2))}" style="font-size: 13px">[修改]</a>
              <a href="{:U(GROUP_NAME . '/Rbac/delNode', array('id' => $m['id']))}" style="font-size: 13px">[删除]</a>
            </h4>
          </div>
        </volist>
        <br>
      </volist>
      <br>
    </volist>

  </div>
</div>

<script>
  function delRole (id) {
    // 动态生成一个form
    var delForm = document.createElement("FORM");
    document.body.appendChild(delForm);
    delForm.method = "POST";
    delForm.action = "{:U(GROUP_NAME . '/Rbac/delRole')}";
    // 添加一个hidden标签用来记录p_id
    var hiddenInput1 = document.createElement("input");
    hiddenInput1.setAttribute("name", "id");
    hiddenInput1.setAttribute("type","hidden");
    hiddenInput1.setAttribute("value",id);
    delForm.appendChild(hiddenInput1);
    delForm.submit();
  }
</script>